package cn.yjh.api.impl;

import cn.yjh.annotation.RPCMapping;
import cn.yjh.annotation.RPCService;
import cn.yjh.api.ConfigurationService;
import cn.yjh.api.PluginService;
import cn.yjh.server.support.Request;


import java.util.concurrent.TimeUnit;

import javax.annotation.Resource;

/**
 * @DESC:
 * @AUTHOR: YouJinhua
 * @DATE: 2021-11-25 22:28:19
 * @VERSION: 1.0
 */
@RPCService(path = "/configuration")
public class ConfigurationServiceImpl implements ConfigurationService {

    @Resource
    PluginService pluginService;


    @RPCMapping("/update")
    @Override
    public boolean updateConfiguration(String name) {
        System.out.println("invoke updateConfiguration......");
        try {
            TimeUnit.MILLISECONDS.sleep(50);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return false;
    }

    @RPCMapping("/upload")
    @Override
    public boolean upload(String username, String password, Request request) {
        System.out.println("用户名："+username);
        System.out.println("进行文件上传");
        return false;
    }


}
